generateMigrationScript

fun generateMigrationScript(vararg tables: Table, scriptDirectory: String, scriptName: String, withLogs: Boolean = true): File

This function simply generates the migration script without applying the migration. Its purpose is to show what the migration script will look like before applying the migration. If a migration script with the same name already exists, its content will be overwritten.

Return

The generated migration script.

Parameters

tables

The tables whose changes will be used to generate the migration script.

scriptName

The name to be used for the generated migration script.

scriptDirectory

The directory (path from repository root) in which to create the migration script.

withLogs

By default, a description for each intermediate step, as well as its execution time, is logged at the INFO level. This can be disabled by setting withLogs to false.

Throws

if no argument is passed for the tables parameter.